package cn.getech.data.metadata.model.req.roledatapermission;

import cn.getech.data.intelligence.common.utils.PageReq;
import cn.getech.data.intelligence.common.validator.group.AddGroup;
import cn.getech.data.intelligence.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

@ApiModel(description = "元数据表权限保存请求")
@Data
public class CollectionTableRoleDataPermissionSaveInner extends PageReq {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("元数据表id")
    @NotNull(message = "元数据表id不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer dataId;

    @ApiModelProperty("查询权限 1 拥有,0 未拥有")
    private Integer query;

    @ApiModelProperty("修改权限 1 拥有,0 未拥有")
    private Integer update;

    @ApiModelProperty("删除权限 1 拥有,0 未拥有")
    private Integer delete;

    @ApiModelProperty("授权权限 1 拥有,0 未拥有")
    private Integer assign;
}
